package spbgpu.ftf.av.ball;

import java.applet.Applet;
import java.awt.Canvas;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Timer;

public class MainApplet extends Applet {

	public static final int WIDTH = 700;

	public static final int HEIGHT = 500;

	int i = 10;
	
	private static final long serialVersionUID = 1L;
	
	Canvas canvas;

	@Override
	public void init() {
		setSize(WIDTH, HEIGHT);
		canvas = new DrawingRegion(WIDTH, HEIGHT);
		add(canvas);
		Timer timer = new Timer(100, new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				canvas.repaint();
			}
		});
		timer.start();
	}
	
}
